Belgelerim/ceng_491/implementation/doxygen/TraffEdu_Developers_Manual_Reference_ToSource/CommandInsertEnvObj.cpp

Go to the documentation of this file.
00001 
00002 CommandInsertEnvObj::CommandInsertEnvObj(osg::Vec3 pos,OSGWindows* osgwind,
00003                                                         string pathname,float scale)
00004 
00005 {
00006         osgwind_=osgwind;
00007         envObj=new EnvironmentObject(pathname,scale);
00008         envObj->setPosition(pos.x(),pos.y(),pos.z());
00009         envObj->getObjectGroup()->setUserData(envObj);  
00010         osgwind_->addObject(envObj); 
00011 
00012         insertedObjs_.push_back(envObj); 
00013         
00014 }
00015 
00016 bool CommandInsertEnvObj::execute()
00017 {
00018 
00019         osgwind_->doAddGeode(envObj);
00020         
00021         return true;
00022 }
00023 
00024 bool CommandInsertEnvObj::unexecute()
00025 {
00026 
00027         osgwind_->doDeleteGeode(envObj);
00028         
00029         return true;
00030         
00031 }
00032 
00033 

Generated on Sun May 28 18:54:09 2006 for TraffEdu by  doxygen 1.4.6-NO